import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import eslintPlugin from 'vite-plugin-eslint'
import path from 'path'

const resolve = url => path.resolve(__dirname, url)

// https://vitejs.dev/config/
export default defineConfig({
  base: './',
  resolve: {
    alias: {
      '@': resolve('src')
    }
  },
  define: {
    __VUE_OPTIONS_API__: false
  },
  plugins: [
    vue(),
    eslintPlugin({ cache: false })
  ],
  server: {
    host: '0.0.0.0',
    port: 8000,
    hmr: { overlay: false }
  }
})
